package com.lifeverse.dto;

import com.lifeverse.entity.LifeEntityRelationship;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 创建生命体关系的数据传输对象
 */
@Data
public class LifeEntityRelationshipCreateDTO {
    
    @NotNull(message = "源生命体ID不能为空")
    private Long sourceEntityId;
    
    @NotNull(message = "目标生命体ID不能为空")
    private Long targetEntityId;
    
    @NotNull(message = "关系类型不能为空")
    private LifeEntityRelationship.RelationshipType relationshipType;
    
    @DecimalMin(value = "0.00", message = "关系强度不能小于0")
    @DecimalMax(value = "100.00", message = "关系强度不能大于100")
    @NotNull(message = "关系强度不能为空")
    private BigDecimal relationshipStrength;
    
    @DecimalMin(value = "0.00", message = "关系质量不能小于0")
    @DecimalMax(value = "100.00", message = "关系质量不能大于100")
    private BigDecimal relationshipQuality = BigDecimal.valueOf(50.00);
    
    @DecimalMin(value = "0.00", message = "信任度不能小于0")
    @DecimalMax(value = "100.00", message = "信任度不能大于100")
    private BigDecimal trustLevel = BigDecimal.valueOf(50.00);
    
    @DecimalMin(value = "0.00", message = "互动频率不能小于0")
    private BigDecimal interactionFrequency = BigDecimal.valueOf(0.00);
    
    @Size(max = 500, message = "描述长度不能超过500字符")
    private String description;
    
    @Size(max = 200, message = "标签长度不能超过200字符")
    private String tags;
    
    private String attributes;
    
    @DecimalMin(value = "-100.00", message = "影响评分不能小于-100")
    @DecimalMax(value = "100.00", message = "影响评分不能大于100")
    private BigDecimal impactScore = BigDecimal.valueOf(0.00);
    
    private Boolean isBidirectional = true;
    
    @DecimalMin(value = "0.0001", message = "网络权重不能小于0.0001")
    @DecimalMax(value = "100.0000", message = "网络权重不能大于100")
    private BigDecimal networkWeight = BigDecimal.valueOf(1.0000);
}